<!-- selected_data.html -->
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>选中的数据</title>
</head>
<body>
    <h1>选中的数据</h1>
    <table>
        <thead>
            <tr>
                <th>检验单号</th>
                <!-- 其他列头 -->
            </tr>
        </thead>
        <tbody id="data-table-body">
            <!-- 数据行将在这里动态添加 -->
        </tbody>
    </table>
    <script>
        document.addEventListener("DOMContentLoaded", function () {
            // 获取URL中的data参数
            var urlParams = new URLSearchParams(window.location.search);
            var dataString = urlParams.get('data');
            var data = JSON.parse(dataString);

            var tableBody = document.getElementById('data-table-body');
            data.forEach(function (rowData) {
                var row = tableBody.insertRow();
                Object.values(rowData).forEach(function (cellData) {
                    var cell = row.insertCell();
                    cell.textContent = cellData;
                });
            });
        });
    </script>
</body>
</html>